package hotciv.variants;

import java.util.HashMap;
import java.util.Map;

import hotciv.common.*;
import hotciv.framework.*;
import hotciv.strategies.LayoutStrategy;

public class AlphaCivLayoutStrategy implements LayoutStrategy {

	private Map<Position, CityImpl> cities = new HashMap<Position,CityImpl>();
	private Map<Position, UnitImpl> units = new HashMap<Position,UnitImpl>();
	private Map<Position, TileImpl> tiles = new HashMap<Position,TileImpl>();
	private Map<Position, Integer> cityProductionStashes = new HashMap<Position,Integer>();
	
	
	public AlphaCivLayoutStrategy() {
	
		
		/* Create cities */
		cities.put(new Position(1,1), new CityImpl(Player.RED));
		cities.put(new Position(4,1), new CityImpl(Player.BLUE));
		
		/* Create units */
		units.put(new Position(2,0), new UnitImpl(Player.RED, GameConstants.ARCHER));
		units.put(new Position(3,2), new UnitImpl(Player.BLUE, GameConstants.LEGION));
		units.put(new Position(4,3), new UnitImpl(Player.RED, GameConstants.SETTLER));
		
		/* Create tiles */
		tiles.put(new Position(1,0), new TileImpl(new Position(1,0), GameConstants.OCEANS));
		tiles.put(new Position(2,2), new TileImpl(new Position(2,2), GameConstants.MOUNTAINS));
		tiles.put(new Position(0,1), new TileImpl(new Position(0,1), GameConstants.HILLS));
	}
	
	/**
	 * @return the cityProductionStashes
	 */
	public Map<Position, Integer> getCityProductionStashes() {
		return cityProductionStashes;
	}

	/**
	 * @return the units
	 */
	public Map<Position, UnitImpl> getUnits() {
		return units;
	}

	/**
	 * @return the tiles
	 */
	public Map<Position, TileImpl> getTiles() {
		return tiles;
	}

	/**
	 * @param cities the cities to set
	 */
	public Map<Position, CityImpl> getCities() {
		return cities;
	}

}
